using System;
using System.ServiceModel;
using RPGOnline.Remoting.Entities;

namespace RPGOnline.Remoting
{
    [ServiceContract(CallbackContract = typeof(IChatCallback), SessionMode = SessionMode.Required)]
    public interface IChat
    {
	    [OperationContract(IsOneWay = true)]
	    void KeepAlive();

        [OperationContract(IsOneWay = true)]
        void RegisterUser(User user, bool asMaster);

        [OperationContract(IsOneWay = true)]
        void UnregisterUser(User user);

        [OperationContract(IsOneWay = true)]
        void SendMessage(Guid chatGroupId, User user, string message);

        [OperationContract(IsOneWay = true)]
        void SendPrivateMessage(User senderUser, User destinationUser, string message);

        [OperationContract(IsOneWay = true)]
        void CreateGroup(ChatGroup chatGroup);

        [OperationContract(IsOneWay = true)]
        void MoveUserToGroup(User user, Guid groupId);

        [OperationContract(IsOneWay = true)]
        void Roll(User user, RollResult rollResult);

        [OperationContract(IsOneWay = true)]
        void UserInfoChanged(User user);

        [OperationContract(IsOneWay = true)]
        void RequestSessionUpdate();
    }
}